package com.acme.task5;

public class TextModifier {
	private static void printHelp() {
		System.out.format("Usage: %s <string>%n", TextModifier.class.getName());
	}
	
	public static void main(String[] args) {
		//TODO: check number of arguments:
        if (args.length != 1) {
            printHelp();
            return;
        }
        
		String str = args[0];
		for (int i = 0; i < str.length(); i++) {
			char charAtIndex = str.charAt(i);
			//TODO: do the task at labguide. Note that String is not a simple char array, but an object
			if (Character.isDigit(charAtIndex)) {
                continue;
        }
        if (charAtIndex == '+' || charAtIndex == '-') {
                System.out.print(charAtIndex);
        }
        System.out.print(charAtIndex);
		}
	}
}
